<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="Content-Language" content="zh-CN"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta http-equiv="Pragma" content="no-cache"/>
    <title>幼儿园管理系统</title>
    <link rel="stylesheet" type="text/css" th:href="@{/css/style_login.css}"
          href="../static/css/style_login.css"/>
</head>

<body>
<div id="topbanner">
</div>
<div id="middlebox">
    <div id="centerwrap">
        <img th:src="@{images/login.jpg}" style="float:left;margin-top: -40px;"/>
        <div id="loginbox">
            <span id="loginbiaoti">用户登录</span>
            <form id="fromLogin" method="post" autocomplete="off">
                <input type="text" name="username" placeholder="用户名" class="logininput"
                       id="loginname"/>
                <input type="password" name="password" placeholder="密码" class="logininput"
                       id="loginpwd"/>

                <input type="submit" id="loginin" onclick="loginUser()"
                       value="登&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;录"/>
            </form>
        </div>
        <div id="shadow"></div>
    </div>
</div>
<div class="b-footer">
    <div class="container">
        <div class="row">
            <div class="col-xs-5">
                <div class="b-footer__company">
                    <p style="margin-top:10px;">版权所有：滁州学院&nbsp;&nbsp;&nbsp;计算机与信息工程学院&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;马继斌</p>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript" src="../static/js/jquery.min.js"
        th:src="@{/js/jquery.min.js}"></script>
<script type="text/javascript" src="../static/plugin/layer/layer.js"
        th:src="@{/plugin/layer/layer.js}"></script>
<script th:inline="javascript">
    $(function () {
        var message = [[${message}]];
        if (message != null && message != "") layer.msg(message);
        loadTopWindow();
    });

    //监听
    window.onresize = function () {
        changeDivHeight();
    };

    function changeDivHeight() {
        var h = $(window).height();//获取页面可见高度
        var h1 = h - 100 - 20 - 150;
        if (h1 > 300) {
            $("#middlebox").innerHeight(h1);
            $("#centerwrap").css('paddingTop', h1 / 2 - 220 + "px");
        }
    };

    // //加载时
    $(function () {
        changeDivHeight();
    });

    function loginUser() {
        // var username = $("#loginname").val();
        // var password = $("#loginpwd").val();
        fromLogin.action = "/loginUser";
        fromLogin.submit();
    }


    //判断当前窗口是否有顶级窗口，如果有就让当前的窗口的地址栏发生变化，
    function loadTopWindow() {
        if (window.top != null && window.top.document.URL != document.URL) {
            window.top.location = document.URL; //这样就可以让登陆窗口显示在整个窗口了
        }
    }
</script>
</body>
</html>
